﻿using System.Security.Cryptography;
using System.Text;

namespace RbacPermissionSystem.Utility
{
    public static class Md5Helper
    {
        /// <summary>
        /// MD5加密方法
        /// </summary>
        /// <param name="Password"></param>
        /// <returns></returns>
        public static string Md5(this string Password)
        {
            return string.Join("", MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(Password)).Select(p => p.ToString("x2")));
        }
    }
}